<div class="fly-header layui-bg-black">
    <div class="layui-container"> 
        <a class="fly-logo" href="/"> <!-- <img src="__STATIC__/index/img/logo.png" alt="layui"> --> </a>
        <ul class="layui-nav fly-nav layui-hide-xs">
            <foreach name="nav" item="vo">
                <li class="layui-nav-item"> <a href="{$vo.url}" <if condition="$vo.is_new eq 1">target="_black"</if>><i class="layui-icon {$vo.icon}"></i>{$vo.name}</a> </li> 
            </foreach>
        </ul>
        <if condition="$user">
        <ul class="layui-nav fly-nav-user">
            <li class="layui-nav-item ">
                <a class="fly-nav-avatar" href="{:url('User/index')}" id="LAY_header_avatar">
                    <cite class="layui-hide-xs">{$user.nickname}</cite>
                    <img src="{$user.head_pic|default='/static/index/img/avatar.png'}">
                </a>
                <dl class="layui-nav-child">
                    <dd>
                        <a href="{:url('User/index')}">
                            <i class="layui-icon">&#xe612;</i>
                            用户中心
                        </a>
                    </dd>
                    <dd>
                        <a href="{:url('user/set')}">
                            <i class="layui-icon">&#xe620;</i>
                            基本设置
                        </a>
                    </dd>
                    <!-- <hr> -->
                 <!--    <dd>
                        <a href="/user/message/">
                            <i class="iconfont icon-tongzhi" style="top: 4px;"></i>
                            我的消息
                        </a>
                    </dd>
                    <dd>
                        <a href="/u/16471056">
                            <i class="layui-icon" style="margin-left: 2px; font-size: 22px;">&#xe68e;</i>
                            我的主页
                        </a>
                    </dd> -->
                    <hr style="margin: 5px 0;">
                    <dd>
                        <a href="{:url('User/logout')}" style="text-align: center;">退出</a>
                    </dd>
                </dl>
            </li>
        </ul>
        <else/>
        <ul class="layui-nav fly-nav-user">
            <li class="layui-nav-item"> <a class="iconfont icon-touxiang layui-hide-xs" href="{:url('User/login')}"></a> </li>
            <li class="layui-nav-item"> <a href="{:url('User/login')}">登入</a> </li>
            <li class="layui-nav-item"> <a href="{:url('User/register')}">注册</a> </li>
            
           <!--  <li class="layui-nav-item layui-hide-xs"> <a href="#" onclick="layer.msg('正在通过QQ登入', {icon:16, shade: 0.1, time:0})" title="QQ登入" class="iconfont icon-qq"></a> </li>
            <li class="layui-nav-item layui-hide-xs"> <a href="#" onclick="layer.msg('正在通过微博登入', {icon:16, shade: 0.1, time:0})" title="微博登入" class="iconfont icon-weibo"></a> </li> -->
        </ul>
        </if>
       
    </div>
</div>